Hi, |
Re: How-to get Doors command line parameters in DXL ?
Which ones? The user password? ;-) There is a good reason, to not have the DXL script query ALL commandline parameters of DOORS. Otherwise a bad trigger could snoop user passwords for those people that have a startlink with their password in place. But on the other hand a bad trigger could do other worse stuff, so why worry ... string s1 = getenv "DOORSADDINS" string s2 = getenv "DOORSPROJECTADDINS" string s3 = getenv "DOORSLAYOUTADDINS"
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How-to get Doors command line parameters in DXL ? Mathias Mamsch - Tue Jul 10 04:44:33 EDT 2012
Which ones? The user password? ;-) There is a good reason, to not have the DXL script query ALL commandline parameters of DOORS. Otherwise a bad trigger could snoop user passwords for those people that have a startlink with their password in place. But on the other hand a bad trigger could do other worse stuff, so why worry ... string s1 = getenv "DOORSADDINS" string s2 = getenv "DOORSPROJECTADDINS" string s3 = getenv "DOORSLAYOUTADDINS"
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Effectively, I don't need to get user or password ;-) (but if Doors crashes, the Doors report displays these) And for the -defopenmode options, there is a solution ? Christophe |
Re: How-to get Doors command line parameters in DXL ? chmari - Tue Jul 10 04:59:40 EDT 2012
Argh, I should have known it. These all work: print (getenv "DOORSDEFOPENMODE") "\n" print (getenv "DOORSUSER") "\n" print (getenv "DOORSPASSWORD") "\n" // bad trigger, here we go!
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How-to get Doors command line parameters in DXL ? Mathias Mamsch - Tue Jul 10 08:14:49 EDT 2012
Argh, I should have known it. These all work: print (getenv "DOORSDEFOPENMODE") "\n" print (getenv "DOORSUSER") "\n" print (getenv "DOORSPASSWORD") "\n" // bad trigger, here we go!
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Wow, that works even under batch mode. So I guess I will put that on the list of the 100 ways to annoy DOORS administrators. If a company has any DXL batch script, that will run regularly as Administrator, and queries any non-system Module or Object Attribute, then the danger is that somebody puts a BadModule in the database, which instead of this attribute contains a DXL attribute with the following code:
if (isBatch) {
string sUser = getenv "DOORSUSER"
stirng sPw = getenv "DOORSPASSWORD"
if (sUser == "Administrator") {
print "Gotcha!"
sendEMailMessage(...)
}
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How-to get Doors command line parameters in DXL ? -for each command line switch print name and value If you want to see if certain command line switches are used I think you can do this:
-Louie |
Re: How-to get Doors command line parameters in DXL ? Mathias Mamsch - Tue Jul 10 08:44:47 EDT 2012 Wow, that works even under batch mode. So I guess I will put that on the list of the 100 ways to annoy DOORS administrators. If a company has any DXL batch script, that will run regularly as Administrator, and queries any non-system Module or Object Attribute, then the danger is that somebody puts a BadModule in the database, which instead of this attribute contains a DXL attribute with the following code:
if (isBatch) {
string sUser = getenv "DOORSUSER"
stirng sPw = getenv "DOORSPASSWORD"
if (sUser == "Administrator") {
print "Gotcha!"
sendEMailMessage(...)
}
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
-Louie |
Re: How-to get Doors command line parameters in DXL ? llandale - Tue Jul 10 10:58:06 EDT 2012
-Louie
Good idea. Just tried it, unfortunately it does not work. DOORS will prefer commandline switches over registry settings (which is, where setenv writes the string). Run this from batch:
setenv ("DOORSPASSWORD", "Curse Words")
print "password:" (getenv("DOORSPASSWORD")) "\n"
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|